<template>
  <div>
    <el-row class="tac">
      <el-col class="tac-main" :span="12">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo tac-border"
          @open="handleOpen"
          @close="handleClose"
        >
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-user-solid"></i>
              <span>门店管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item class="liWidth" index="1-1"><router-link to="/admin/index/storeAdd">门店申请</router-link></el-menu-item>
              <el-menu-item class="liWidth" index="1-2"><router-link to="/admin/index/storeList">查看门店</router-link></el-menu-item>
              <!-- <el-menu-item class="liWidth" index="1-3"><router-link to="/admin/index/storePut">修改门店</router-link></el-menu-item>
              <el-menu-item class="liWidth" index="1-4"><router-link to="/ele/list">关闭门店</router-link></el-menu-item> -->
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-knife-fork"></i>
              <span>商品管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item class="liWidth" index="2-1"><router-link to="/admin/index/commoditylist">商品列表</router-link></el-menu-item>
              <el-menu-item class="liWidth" index="2-2"><router-link to="/admin/index/putaway">上架商品</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-knife-fork"></i>
              <span>库存管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item class="liWidth" index="3-1"><router-link to="/admin/index/inventory">库存列表</router-link></el-menu-item>
              <el-menu-item class="liWidth" index="3-2"><router-link to="/admin/index/addInventory">新增库存</router-link></el-menu-item>
              <el-menu-item class="liWidth" index="3-3"><router-link to="/admin/index/echartInvenory">图表统计</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="4">
            <template slot="title">
              <i class="el-icon-knife-fork"></i>
              <span>订单管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item class="liWidth" index="4-1"><router-link to="/admin/index/orders">订单列表</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="5">
            <template slot="title">
              <i class="el-icon-knife-fork"></i>
              <span>数据统计</span>
            </template>
            <el-menu-item-group>
              <el-menu-item class="liWidth" index="5-1"><router-link to="/ele/list">待续</router-link></el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  methods: {
    handleOpen(key, keyPath) {
      // console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      // console.log(key, keyPath);
    },
    // add(){
    //   this.$router.push("/system/addGenerals").catch(err => err) ;
    // },
    // main(){
    //   this.$router.push("/system/main").catch(err => err) ;
    // }
  }
};
</script>

<style scoped>
*{
    box-sizing: border-box;
}
a{
  text-decoration: none;
  color: black;
  display: block;
  width: 100%;
  height: 100%;
}
.el-menu-item-group__title{
  padding-left: 0;
}
.el-table th,
.el-table td {
  text-align: center !important;
}
.el-main {
  line-height: normal !important;
}
.tac{
    border: none;
    width: 100%;
}
.tac-main {
  width: 100%;
  border: none;
}
.tac-border{  
    border: none;
    width: 100%;
}
.liWidth{
  padding: 0px;
}
</style>